<?php
	class loaikyhanbs
	{
		// Các trường
		public $MaLoaiKyHan = 0;
		public $TenLoaiKyHan = "";
		public $KyHan = "";
		
		// Các phương thức
		public function Them()
		{
			$db = new loaikyhandb();
			return $db->Them($this->TenLoaiKyHan,
						     $this->KyHan);
		}
		
		public function CapNhat()
		{
			$db = new loaikyhandb();
			return $db->CapNhat($this->MaLoaiKyHan, 
								$this->TenLoaiKyHan,
								$this->KyHan);
		}
		
		public function TonTaiTrongLaiSuatGui()
		{
			$db = new loaikyhandb();
			return $db->TonTaiTrongLaiSuatGui($this->MaLoaiKyHan);
		}
		
		public function Xoa()
		{
			$db = new loaikyhandb();
			return $db->Xoa($this->MaLoaiKyHan);
		}
		
		public function XoaTatCa()
		{
			$db = new loaikyhandb();
			return $db->XoaTatCa();
		}
		
		public function LayDanhSach()
		{
			$db = new loaikyhandb();
			return $db->LayDanhSach($this->MaLoaiKyHan,
									$this->TenLoaiKyHan,
									$this->KyHan);
		}
	}
?>